package com.zkh360.service.message.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zkh360.service.message.domain.SysRoles;
import com.zkh360.service.message.model.SysUserVO;
import com.zkh360.service.message.mybatis.BaseMapper;

/**
 * Created by chuanxi.zhao on 18-1-19.
 */
@Mapper
public interface RoleMapper extends BaseMapper<SysRoles> {
	
	
	/**
	 * 根据用户获取角色信息
	 * 
	 * @param sysUsers 用户属性
	 * @return 角色信息
	 */
	public List<SysRoles> getRolesByUser(@Param("user_id")Long user_id, 
										 @Param("user_account")String user_account, 
										 @Param("startRow")Integer startRow, 
										 @Param("pageSize")Integer pageSize);
	
	
	/**
	 * 根据权限和角色状态查询角色信息
	 * 
	 * @param authorityId 权限ID
	 * @param enabled     角色状态
	 * @return 满足条件的角色信息
	 */
	public List<SysRoles> getRoleByAuthorityId(@Param("authorityId") Integer authorityId, @Param("enabled") Integer enabled);
	
	/**
	 * 
	 * 
	 * @param sysUsersVo
	 * @return
	 */
	public int getRolesCount(@Param("sysUsersVO") SysUserVO sysUsersVo);

}
